package com.adingxiong.pm.controller;


import com.adingxiong.pm.entity.Devcodevalue;
import com.adingxiong.pm.model.Result;
import com.adingxiong.pm.model.RetCode;
import com.adingxiong.pm.server.IDevcodevalueService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiongc
 * @since 2020-03-05
 */
@RestController
@RequestMapping("/codevalue")
@Api(tags = "代码值相关")
public class DevcodevalueController {

    @Autowired
    private IDevcodevalueService service;

    @ApiOperation(value = "查询代码值详细信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id" ,value = "主键id" ,dataType = "int", required = true, paramType = "query")
    })
    @RequestMapping(value = "/getOne" ,method = RequestMethod.GET)
    private Result getOne(Integer id ){
        Devcodevalue info = service.getById(id);
        return new Result<>().setCode(RetCode.SUCCESS).setMsg("查询成功").setData(info);
    }



}

